OS : Linux
PHP Version : 7.4.33
Software : Apache/2.4.6 (CentOS) PHP/7.4.33
Information System : Linux apprendre2 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
Disable Function : NONE
init'
),
'6.9.0'
);
return null;
}
if ( null === self::$instance ) {
self::$instance = new self();
// Ensure ability category registry is initialized first to allow categories to be registered
// before abilities that depend on them.
WP_Ability_Categories_Registry::get_instance();
/**
* Fires when preparing abilities registry.
*
* Abilities should be created and register their hooks on this action rather
* than another action to ensure they're only loaded when needed.
*
* @since 6.9.0
*
* @param WP_Abilities_Registry $instance Abilities registry object.
*/
do_action( 'wp_abilities_api_init', self::$instance );
}
return self::$instance;
}
/**
* Wakeup magic method.
*
* @since 6.9.0
* @throws LogicException If the registry object is unserialized.
* This is a security hardening measure to prevent unserialization of the registry.
*/
public function __wakeup(): void {
throw new LogicException( __CLASS__ . ' should never be unserialized.' );
}
/**
* Sleep magic method.
*
* @since 6.9.0
* @throws LogicException If the registry object is serialized.
* This is a security hardening measure to prevent serialization of the registry.
*/
public function __sleep(): array {
throw new LogicException( __CLASS__ . ' should never be serialized.' );
}
}